//
//  QTapGesture.m
//  09-静态单元格
//
//  Created by Sizhu Ba on 2017/9/11.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "QTapGesture.h"

@implementation QTapGesture
+(void)addguest:(UIView *)view andAction: (ResObj) action{
    QTapGesture * tap = [QTapGesture new];
    tap.tapend = action;
    [tap addTarget:tap action:@selector(tapgesture:)];
    [view setUserInteractionEnabled:true];
    [view addGestureRecognizer:tap];
}

-(void)tapgesture:(UITapGestureRecognizer *) tap {
    
    if (self.tapend!=nil){
        self.tapend(tap.view);
    }
    
}
@end
